import { getAction,postAction} from '@/api/manage'
import { downloadFile } from '@/api/manage'
//菜单管理功能
const getResource = (params)=>getAction("/platform/system/resourceApi/getResource",params);
const deleteResource= (params)=>getAction("/platform/system/resourceApi/del",params);
const saveResource= (params)=>postAction("/platform/system/resourceApi/save",params);

//附件SysFile相关
const deleteSysFile= (params)=>getAction("/file/sysFile/del",params);
const downloadSysFile= (fileName,params)=>downloadFile("/file/sysFile/download",fileName,params);
const sysFileExists= (params)=>getAction("/file/sysFile/fileIsExsits",params);
//获取视频地址
const getMediaPath= (params)=>getAction("/file/sysFile/getMediaPath",params);
//获取pdf 路径 ；如果没有转换的话，返回转换后的pdf path
const getPdfPath=(params)=>getAction("/file/sysFile/getPdfPath",params);


//License授权
const saveLicense= (params)=>downloadFile("/platform/system/sysLicense/create","license.lrc",params);

//iakey
const getUserInfo= (params)=>getAction("/platform/system/ukey/getUserInfo",params);
const iakeyCreate= (params)=>getAction("/platform/system/ukey/create",params);
const iakeyDel= (params)=>getAction("/platform/system/ukey/delKey",params);

export {
    getResource,
    deleteResource,
    saveResource,
    deleteSysFile,
    saveLicense,
    downloadSysFile,
    sysFileExists,
    getMediaPath,
    getPdfPath,
    getUserInfo,
    iakeyCreate,
    iakeyDel
}